/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chapter6;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author Denise Carolina
 */
public class SelfTest14 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Pattern p = Pattern.compile("\\d+");
        Matcher m = p.matcher("ab2c4d67");

        int count = 0;

        while(m.find()){
            count++;
            System.out.println("position:: " + m.start() + " - " + m.group());
        }

        System.out.println("count:: " + count);
    }

}
